// Yang Shuai  Copyright (c) 2022 https://yangbuyi.top.
// Copyright (c) 2022. Yangbuyi, personal projects are not allowed to be commercialized without permission.
// Please keep the information of the original author of the code. Thank you

package top.yangbuyi.service;

import com.arcsoft.face.FaceInfo;
import com.arcsoft.face.toolkit.ImageInfo;
import top.yangbuyi.dto.FaceUserInfo;
import top.yangbuyi.dto.ProcessInfo;

import java.util.List;
import java.util.concurrent.ExecutionException;

/**
 * 人脸识别接口
 * @author yangbuyi.top
 */
public interface FaceEngineService {


    /**
     * 人脸特征
     *
     * @param imageInfo
     * @return
     */
    byte[] extractFaceFeature (ImageInfo imageInfo) throws InterruptedException;


    /**
     * 人脸检测
     *
     * @param imageInfo
     * @return
     */
    List<FaceInfo> detectFaces (ImageInfo imageInfo);

    /**
     * 提取年龄-性别
     *
     * @param imageInfo
     * @return
     */
    List<ProcessInfo> process (ImageInfo imageInfo);

    /**
     * 人脸比对
     *
     * @param groupId
     * @param faceFeature
     * @return
     */
    List<FaceUserInfo> compareFaceFeature (byte[] faceFeature, Integer groupId) throws InterruptedException, ExecutionException;


}
